﻿@model System.Web.Mvc.HandleErrorInfo

@{
    ViewBag.Title = "[[[Error]]]";
}

<div class="section panel-header bdr-b mrg-b text-center">
    <div class="container-fluid">
        <div class=" col-md-12">
            <i class="mdi-alert-warning text-yellow large"></i>
            @if (String.IsNullOrEmpty(ViewBag.ErrorMessage))
            {
                <h1>[[[An error occurred]]]</h1>
                <p class="lead text-lighten">
                    @ViewBag.ErrorMessage
                </p>
            }
            else if (Model == null)
            {
                <h1>404</h1>
                <p class="lead text-lighten">
                    [[[The page you were looking for doesn't exist.]]]
                </p>
            }
            else
            {
                <h1>500</h1>
                <p class="lead text-lighten">
                    [[[Error processing the page]]]
                </p>

                if (HttpContext.Current.IsDebuggingEnabled)
                {
                    <div>
                        <p>
                            <b>Exception:</b> @Model.Exception.Message<br />
                            <b>Controller:</b> @Model.ControllerName<br />
                            <b>Action:</b> @Model.ActionName
                        </p>
                        <div style="overflow: scroll">
                            <pre>@Model.Exception.StackTrace</pre>
                        </div>
                    </div>
                }
            }

            <a href="@Url.Action("Index","Home")" class="btn btn-primary">[[[Back to the Home]]]</a>
        </div>
    </div>
</div>